/***********************************************************************************
*	File: GamePlayState.h
*	Author: Keisuke Miyazaki
*	Project: Straw Man
*	Date: 09/13/2013
***********************************************************************************/
#ifndef GAMEPLAYSTATE_H_
#define GAMEPLAYSTATE_H_

#define WIN32_LEAN_AND_MEAN
#include <Windows.h>

#include "igamestate.h"
class CFrames;
class CAnimation;
class CAnimationSystem;

class CSGD_EventSystem;
class CSGD_MessageSystem;
class IMessage;

class CEntityManager;
class CEntity;
class CPlayer;
class CEnemy;

class CGamePlayState : public IGameState
{
public:
	static CGamePlayState* GetInstance( void );
	static void DeleteInstance( void );

	virtual void Enter	( void );
	virtual void Exit	( void );
	virtual bool Input	( void );

	virtual void Update	( float fElapsedTime );
	virtual void Render	( void );						

	float GetWorldWidth	( void ) const	{	return m_fWorldWidth;	}
	float GetWorldHeight( void ) const	{	return m_fWorldHeight;	}
	float GetCameraX	( void ) const	{	return m_fCameraX;		}
	float GetCameraY	( void ) const	{	return m_fCameraY;		}

	void English ( void );
	void Japanese ( void );

private:
	static CGamePlayState* s_pInstance;

	CGamePlayState(void);
	virtual ~CGamePlayState(void){}
	CGamePlayState( const CGamePlayState& );
	CGamePlayState& operator= (const CGamePlayState& );

	static void MessageProc( IMessage* pMsg );

	CEntity* CreateKunai( int owner, float _x, float _y, int _direction );

#pragma region World and Camera Parameters

	float				m_fWorldWidth;
	float				m_fWorldHeight;
	float				m_fCameraX;
	float				m_fCameraY;

#pragma endregion

#pragma region Pause Menu Stuff
	bool				m_bIsPaused;
	bool				m_bInOptions;
	int					m_nPauseCursor;
	int					m_nOptionCursor;
#pragma endregion

	// Assets
	int					m_nBackgroundID;
	int					m_nBgmID;

	int					m_nKunaiImgID;
	int					m_nKunaiSfxID;
						
	float				m_fSampleTime;

	CSGD_EventSystem*	m_pES;
	CSGD_MessageSystem*	m_pMS;
	CEntityManager*		m_pEM;

	CPlayer*				m_pTempHero;
	CEnemy*					m_pTempEnemy;


	
	// Animation XML
	bool LoadAnimation( const char* fileName );
	CFrames*          myFrame;
	CAnimation*       myAnimation;
	CAnimationSystem* myAnimationSystem;
	CAnimation* pAnimation;
	int nAnimID;
};

#endif //GAMEPLAYSTATE_H_